home *** CD-ROM | disk | FTP | other *** search
- Path: ltisun13.epfl.ch!odowd
- From: odowd@ltisun13.epfl.ch (Mike Odowd)
- Newsgroups: comp.lang.c++
- Subject: Multiple copies of Virtual Tables
- Date: 15 Feb 1996 11:06:55 GMT
- Organization: Ecole Polytechnique Fidirale de Lausanne
- Message-ID: <4fv44f$qs3@info.epfl.ch>
- NNTP-Posting-Host: ltisun13.epfl.ch
-
- Hi,
-
- The size of my executable has been growing exponentially over
- the last few months. After investigation, I found that I have
- multiple copies of the virtual tables.
-
- It seems that each source file that uses a class ends up with
- a copy of the class' virtual table in its object file. I one
- case, I counted 91 object files that contain a copy of the
- same virtual table.
-
- There are about 200 classes in the system, but I have 3885
- virtual tables. They represent approx 25% of the size of the
- executable once the symbols have been stripped. This code has
- to run on an embedded system with limited memory capacity and
- things are getting pretty tight.
-
- Is there any way to make the virtual tables global, so that there
- is only one instance of each table?
-
- I am using gcc v2.6.0
-
-
- Thanks for any help
-
- Mike O'Dowd
- odowd@lightning.ch
-